#ifndef _TIM_CALC_H_
#define _TIM_CALC_H_

#include <stdio.h>
#include <stm32f10x.h>
#include <stm32f10x_it.h>
#include "gizwits_product.h"

typedef struct{
float sec;
uint32_t num;
uint32_t counter1;
uint32_t counter2;
uint32_t timcounter;
float frq;
uint8_t state;
}thTypedef_CF;

typedef struct{
float sec1;
uint32_t num1;
uint32_t counter11;
uint32_t counter21;
uint32_t timcounter1;
float frq1;
uint8_t state1;
}thTypedef_CF1; 

void TIM_Calc_Init(void);
void Timer1_Init(void);
//void TIM2_Init(void);
void NVIC_Calc_Init(void);
void EXTI_Calc_Init(void);
void CalcGpioInit(void);
void frq_read(uint32_t *V_send,uint32_t *I_send,uint32_t *PN);


#endif
